cmake_minimum_required(VERSION 3.0.0)

project(yolov5_data_process VERSION 0.1.0 LANGUAGES CXX)

# release模式
set(CMAKE_BUILD_TYPE "Release")
# set(CMAKE_BUILD_TYPE "Debug")
# 去掉console
set(CMAKE_EXE_LINKER_FLAGS "-mwindows")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)

set(QT_PATH "D:/Qt/5.15.2/mingw81_64")
set(ENV{Path} "${QT_PATH}/bin;$ENV{Path}")
list(APPEND CMAKE_PREFIX_PATH "${QT_PATH}/lib/cmake/")

find_package(Qt5 COMPONENTS Widgets)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON) 
set(CMAKE_AUTOUIC ON)

set(rcc_files ../assets/assets.qrc)
# include_directories("${QT_PATH}/include")
# include_directories("D:/Qt/5.15.2/mingw81_64/include")
include_directories("./include")
link_directories("${QT_PATH}/lib")

FILE(GLOB_RECURSE SRC_LIST "src/*.cpp")
FILE(GLOB_RECURSE HEAD_LIST "include/*.h")


add_executable(${PROJECT_NAME} main.cpp
        app_win32.rc
        ${SRC_LIST} ${HEAD_LIST} ${rcc_files}
) 
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Gui Qt5::Widgets)